package com.aoxon.cargo.service;

import java.util.HashMap;

import com.aoxon.cargo.bean.Cloth;
import com.aoxon.cargo.bean.GsonBean;
import com.aoxon.cargo.cache.keyCache;
import com.google.gson.Gson;

/**
 * 添加物品信息的服务
 * 
 * @author ZZJ
 * 
 */
public class AddGoodsService extends MyService {

	/**
	 * 添加物品信息的操作
	 * @param cloth
	 * @return
	 */
	public GsonBean execute(Cloth cloth) {

		url = "addClothInfor" + suffix;

		params = new HashMap<String, String>();
		params.put("supId", String.valueOf(keyCache.supId));
		params.put("key", keyCache.key);
		params.put("clothInfo", new Gson().toJson(cloth));

		return doPost();

	}

}
